{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import math"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['area', 'banks', 'buy_ratio', 'category', 'date', 'draw_prob',\n",
       "       'eipo', 'firstday_performance', 'hk_portion', 'ipo_price',\n",
       "       'ipo_price_range', 'market_type', 'name', 'now_price', 'one_hand',\n",
       "       'predict_profile_market_ratio', 'predict_profit_ratio',\n",
       "       'profit_ratio', 'recommender', 'sales', 'shares_per_hand',\n",
       "       'stock_type', 'total_performance', 'total_value', 'website'], dtype=object)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Read two files and merge\n",
    "df1 = pd.read_csv('../data/ipo_list', sep='\\t', index_col='code')\n",
    "del df1['Unnamed: 0']\n",
    "\n",
    "df2 = pd.read_csv('../data/ipo_details', sep= '\\t', index_col = 0)\n",
    "\n",
    "#Use combine_first to avoid duplicate columns\n",
    "#result = pd.concat([df, df2], axis = 1, join='inner')\n",
    "df = df1.combine_first(df2)\n",
    "\n",
    "#Save to file\n",
    "df.to_csv('../data/ipo_data_processed', sep='\\t', encoding='utf-8')\n",
    "df.columns.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>area</th>\n",
       "      <th>buy_ratio</th>\n",
       "      <th>category</th>\n",
       "      <th>draw_prob</th>\n",
       "      <th>firstday_performance</th>\n",
       "      <th>hk_portion</th>\n",
       "      <th>ipo_price</th>\n",
       "      <th>market_type</th>\n",
       "      <th>one_hand</th>\n",
       "      <th>recommender</th>\n",
       "      <th>sales</th>\n",
       "      <th>shares_per_hand</th>\n",
       "      <th>stock_type</th>\n",
       "      <th>ipo_price_range_ratio</th>\n",
       "      <th>total_value_mid</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>8465</th>\n",
       "      <td>全球</td>\n",
       "      <td>13.6</td>\n",
       "      <td>工業用品</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.68</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>工銀國際融資有限公司 (相關往績)</td>\n",
       "      <td>工銀國際證券有限公司、創僑證券有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.372881</td>\n",
       "      <td>0.536900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8427</th>\n",
       "      <td>馬來西亞</td>\n",
       "      <td>11.2</td>\n",
       "      <td>電訊及網絡器材</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.5000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.28</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>興業金融融資有限公司 (相關往績)</td>\n",
       "      <td>豐盛東方資本有限公司、潮商證券有限公司、智華證券有限公司</td>\n",
       "      <td>8000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.214286</td>\n",
       "      <td>0.173600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1216</th>\n",
       "      <td>中國</td>\n",
       "      <td>0.0</td>\n",
       "      <td>銀行</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0163</td>\n",
       "      <td>0.0386</td>\n",
       "      <td>2.45</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中信里昂證券資本市場有限公司 (相關往績)、摩根大通證券(遠東)有限公司 (相關往績)、建銀...</td>\n",
       "      <td>中信里昂、摩根大通、建銀國際、招銀國際、交銀國際、廣發証券、中州國際、海通國際、浦銀國際、首控證券</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.044444</td>\n",
       "      <td>8.167500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8291</th>\n",
       "      <td>中國</td>\n",
       "      <td>12.1</td>\n",
       "      <td>鋼鐵</td>\n",
       "      <td>0.903</td>\n",
       "      <td>0.0462</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.65</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>2.0</td>\n",
       "      <td>高企業融資有限公司 (相關往績)</td>\n",
       "      <td>力高證券有限公司、擎天證券有限公司</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>0.240000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8472</th>\n",
       "      <td>香港</td>\n",
       "      <td>10.5</td>\n",
       "      <td>其他支援服務</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.50</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>八方金融有限公司 (相關往績)</td>\n",
       "      <td>興證國際金融集團有限公司、鴻鵬資本證券有限公司</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1676</th>\n",
       "      <td>中國</td>\n",
       "      <td>8.2</td>\n",
       "      <td>包裝食品</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.66</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>東興證券(香港)有限公司 (相關往績)</td>\n",
       "      <td>東興證券(香港)有限公司、富滙證券有限公司、雅利多證券有限公司</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.349650</td>\n",
       "      <td>0.715000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1649</th>\n",
       "      <td>中國</td>\n",
       "      <td>0.0</td>\n",
       "      <td>供電供熱</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0125</td>\n",
       "      <td>0.0494</td>\n",
       "      <td>1.60</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中國國際金融香港證券有限公司 (相關往績)</td>\n",
       "      <td>中國國際金融香港證券有限公司、中銀國際亞洲有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.048780</td>\n",
       "      <td>1.262800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8481</th>\n",
       "      <td>全球</td>\n",
       "      <td>0.3</td>\n",
       "      <td>家具及家居用品</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.4265</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.68</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>大有融資有限公司 (相關往績)</td>\n",
       "      <td>阿仕特朗資本管理有限公司、鼎成證券有限公司、中國建信金融服務有限公司、創陞證券有限公司、華邦...</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.370370</td>\n",
       "      <td>0.337500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8462</th>\n",
       "      <td>新加坡</td>\n",
       "      <td>2.2</td>\n",
       "      <td>其他支援服務</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0556</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.45</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>創僑國際有限公司 (相關往績)</td>\n",
       "      <td>太平基業證券有限公司</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>0.300000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>994</th>\n",
       "      <td>香港</td>\n",
       "      <td>416.9</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.3023</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.86</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>凱基金融亞洲有限公司 (相關往績)</td>\n",
       "      <td>凱基金融亞洲有限公司、鴻鵬資本證券有限公司、鼎珮證券有限公司</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.222222</td>\n",
       "      <td>0.478080</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8257</th>\n",
       "      <td>全球</td>\n",
       "      <td>2.6</td>\n",
       "      <td>半導體</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0955</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.22</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>豐盛融資有限公司 (相關往績)</td>\n",
       "      <td>豐盛東方資本有限公司、潮商證券有限公司、中港通證券有限公司</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.370370</td>\n",
       "      <td>0.270000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8463</th>\n",
       "      <td>新加坡</td>\n",
       "      <td>0.0</td>\n",
       "      <td>汽車及零部件</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1370</td>\n",
       "      <td>0.2714</td>\n",
       "      <td>0.73</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>富強金融資本有限公司 (相關往績)</td>\n",
       "      <td>太平基業證券有限公司、阿仕特朗資本管理有限公司、豐盛東方資本有限公司</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.191781</td>\n",
       "      <td>0.328500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8297</th>\n",
       "      <td>香港</td>\n",
       "      <td>0.0</td>\n",
       "      <td>服裝</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1375</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.40</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>力高企業融資有限公司 (相關往績)</td>\n",
       "      <td>博恩證劵有限公司、中國銀河國際證券(香港)有限公司、康宏証券投資服務有限公司、力高證券有限公...</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.240000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6088</th>\n",
       "      <td>全球</td>\n",
       "      <td>1.4</td>\n",
       "      <td>資訊科技器材</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1667</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.70</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中國國際金融香港證券有限公司 (相關往績)、瑞士信貸(香港)有限公司 (相關往績)、美林遠東...</td>\n",
       "      <td>中國國際金融香港證券有限公司、瑞士信貸(香港)有限公司、Merrill Lynch Far ...</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.256410</td>\n",
       "      <td>17.977994</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8405</th>\n",
       "      <td>香港</td>\n",
       "      <td>37.9</td>\n",
       "      <td>其他支援服務</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.2361</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.72</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>國泰君安融資有限公司 (相關往績)</td>\n",
       "      <td>國泰君安證券(香港)有限公司、平安證券有限公司、同人融資有限公司</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.133333</td>\n",
       "      <td>0.300000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6113</th>\n",
       "      <td>马来西亚</td>\n",
       "      <td>7.4</td>\n",
       "      <td>其他支援服務</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0507</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.38</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>創僑國際有限公司 (相關往績)</td>\n",
       "      <td>創僑證券有限公司、平安證券有限公司、興業金融(香港)有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.153846</td>\n",
       "      <td>0.520000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1962</th>\n",
       "      <td>全球</td>\n",
       "      <td>0.1</td>\n",
       "      <td>美容及個人護理</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.2606</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.65</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>聯昌證券有限公司 (相關往績)</td>\n",
       "      <td>聯昌證券有限公司、國泰君安證券(香港)有限公司、富強證券有限公司、中國銀河國際證券(香港)有...</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.140845</td>\n",
       "      <td>1.091625</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1702</th>\n",
       "      <td>中國</td>\n",
       "      <td>2.7</td>\n",
       "      <td>化肥農藥</td>\n",
       "      <td>0.701</td>\n",
       "      <td>0.5094</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.06</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>3.0</td>\n",
       "      <td>凱基金融亞洲有限公司 (相關往績)</td>\n",
       "      <td>凱基金融亞洲有限公司、國泰君安證券(香港)有限公司、匯盈證券有限公司、東興證券(香港)有限公司</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.264151</td>\n",
       "      <td>0.657200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1695</th>\n",
       "      <td>東南亞</td>\n",
       "      <td>8.4</td>\n",
       "      <td>食品添加劑及調味料</td>\n",
       "      <td>0.401</td>\n",
       "      <td>1.5833</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.48</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>7.0</td>\n",
       "      <td>東興證券(香港)有限公司 (相關往績)</td>\n",
       "      <td>雅利多證券有限公司、瑞邦證券有限公司、東興證券(香港)有限公司、博思融資有限公司、易易壹證券...</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>0.518400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1932</th>\n",
       "      <td>香港</td>\n",
       "      <td>2.5</td>\n",
       "      <td>工業用品</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1047</td>\n",
       "      <td>0.3456</td>\n",
       "      <td>0.86</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>創陞融資有限公司 (相關往績)</td>\n",
       "      <td>創陞證券有限公司、國金證券(香港)有限公司、鼎成證券有限公司、中金三甲證券、中募金融資管、國...</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.072289</td>\n",
       "      <td>0.861125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8157</th>\n",
       "      <td>廈門</td>\n",
       "      <td>0.7</td>\n",
       "      <td>航運及港務</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0273</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.22</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中州國際融資有限公司 (相關往績)</td>\n",
       "      <td>中州國際融資有限公司、潮商證券有限公司、豐盛東方資本有限公司、太平基業證券有限公司</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.240000</td>\n",
       "      <td>0.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8469</th>\n",
       "      <td>中國</td>\n",
       "      <td>3.0</td>\n",
       "      <td>其他金融</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1150</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.00</td>\n",
       "      <td>香港聯合交易所有限公司(創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>德健融資有限公司 (相關往績)</td>\n",
       "      <td>德健證券有限公司、聯合證券有限公司、潮商證券有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>1.480000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8362</th>\n",
       "      <td>香港</td>\n",
       "      <td>19.0</td>\n",
       "      <td>包裝食品</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.2800</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.20</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>滙富融資有限公司 (相關往績)</td>\n",
       "      <td>滙富金融服務有限公司、平安證券有限公司</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>0.280000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1571</th>\n",
       "      <td>中國</td>\n",
       "      <td>59.0</td>\n",
       "      <td>汽車及零部件</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0556</td>\n",
       "      <td>0.4000</td>\n",
       "      <td>3.42</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>法國巴黎證券(亞洲)有限公司 (相關往績)</td>\n",
       "      <td>法國巴黎證券(亞洲)有限公司、農銀國際證券有限公司、太平基業證券有限公司</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.088550</td>\n",
       "      <td>3.275000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8460</th>\n",
       "      <td>香港</td>\n",
       "      <td>0.9</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1583</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.24</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>富比資本有限公司 (相關往績)</td>\n",
       "      <td>富比資本有限公司、智華證券有限公司</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.181818</td>\n",
       "      <td>0.220000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1551</th>\n",
       "      <td>中國</td>\n",
       "      <td>0.0</td>\n",
       "      <td>銀行</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0020</td>\n",
       "      <td>0.0337</td>\n",
       "      <td>5.10</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中國國際金融香港證券有限公司 (相關往績)、招商證券(香港)有限公司 (相關往績)、建銀國際...</td>\n",
       "      <td>中國國際金融香港證券有限公司、招商證券(香港)有限公司、農銀國際融資有限公司、建銀國際金融有...</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.054581</td>\n",
       "      <td>50.316418</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8420</th>\n",
       "      <td>新加坡</td>\n",
       "      <td>1.9</td>\n",
       "      <td>電訊服務</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.48</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>3.0</td>\n",
       "      <td>西證(香港)融資有限公司 (相關往績)</td>\n",
       "      <td>西證(香港)證券經紀有限公司、方正證券(香港)有限公司、雅利多證券有限公司、國金證券(香港)...</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>0.300000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1630</th>\n",
       "      <td>香港</td>\n",
       "      <td>4.8</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.4211</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.38</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>德健融資有限公司 (相關往績)</td>\n",
       "      <td>德健證券有限公司、潮商證劵有限公司</td>\n",
       "      <td>6000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.100000</td>\n",
       "      <td>0.600000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8446</th>\n",
       "      <td>香港</td>\n",
       "      <td>10.6</td>\n",
       "      <td>影視娛樂</td>\n",
       "      <td>0.751</td>\n",
       "      <td>0.9667</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.30</td>\n",
       "      <td>香港聯合交易所有限公司 (創業板)</td>\n",
       "      <td>8.0</td>\n",
       "      <td>申萬宏源融資(香港)有限公司 (相關往績)</td>\n",
       "      <td>太平基業證券有限公司</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6038</th>\n",
       "      <td>香港</td>\n",
       "      <td>741.3</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>0.150</td>\n",
       "      <td>0.1098</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.41</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>200.0</td>\n",
       "      <td>大有融資有限公司 (相關往績)</td>\n",
       "      <td>雅利多證券有限公司、南華證券投資有限公司、瑞邦證券有限公司、中佳證券有限公司、創富融資有限公司</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.048780</td>\n",
       "      <td>0.410000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1035</th>\n",
       "      <td>全球</td>\n",
       "      <td>48.3</td>\n",
       "      <td>生物科技</td>\n",
       "      <td>0.601</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.75</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>2.0</td>\n",
       "      <td>海通國際資本有限公司 (相關往績)</td>\n",
       "      <td>海通國際證券有限公司</td>\n",
       "      <td>1500.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.344828</td>\n",
       "      <td>0.988990</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2277</th>\n",
       "      <td>香港</td>\n",
       "      <td>26.9</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0500</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>0.60</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>大有融資有限公司 (相關往績)</td>\n",
       "      <td>東方匯財證券有限公司</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2066</th>\n",
       "      <td>中國</td>\n",
       "      <td>1.2</td>\n",
       "      <td>銀行</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0027</td>\n",
       "      <td>0.0451</td>\n",
       "      <td>7.56</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>招商證券(香港)有限公司 (相關往績)</td>\n",
       "      <td>招商證券(香港)有限公司、大華繼顯(香港)有限公司、建銀國際金融有限公司、盛源證券有限公司、...</td>\n",
       "      <td>500.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.049869</td>\n",
       "      <td>11.740458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1381</th>\n",
       "      <td>中國</td>\n",
       "      <td>11.6</td>\n",
       "      <td>供電供熱</td>\n",
       "      <td>0.701</td>\n",
       "      <td>0.0043</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.33</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>2.0</td>\n",
       "      <td>招商證券(香港)有限公司 (相關往績)</td>\n",
       "      <td>招商證券(香港)有限公司、高富金融有限公司</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3699</th>\n",
       "      <td>全球</td>\n",
       "      <td>4.3</td>\n",
       "      <td>地產發展</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0260</td>\n",
       "      <td>0.0482</td>\n",
       "      <td>48.00</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中國國際金融香港證券有限公司 (相關往績)、HSBC Corporate Finance (...</td>\n",
       "      <td>中國國際金融香港證券有限公司、高盛(亞洲)有限責任公司、瑞士銀行、香港上海匯豐銀行有限公司、...</td>\n",
       "      <td>100.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.170678</td>\n",
       "      <td>206.899785</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1958</th>\n",
       "      <td>中國</td>\n",
       "      <td>1.1</td>\n",
       "      <td>汽車及零部件</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0056</td>\n",
       "      <td>0.0464</td>\n",
       "      <td>8.90</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>HSBC Corporate Finance (Hong Kong) Limited (相關...</td>\n",
       "      <td>德意志銀行、The Hongkong and Shanghai Banking Corpor...</td>\n",
       "      <td>500.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.252874</td>\n",
       "      <td>18.276009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1438</th>\n",
       "      <td>全球</td>\n",
       "      <td>50.7</td>\n",
       "      <td>殯儀</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.3000</td>\n",
       "      <td>0.4000</td>\n",
       "      <td>3.00</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>瑞銀證券香港有限公司 (相關往績)、星展亞洲融資有限公司 (相關往績)</td>\n",
       "      <td>瑞士銀行、星展亞洲融資有限公司、聯昌證券有限公司</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.119122</td>\n",
       "      <td>8.609156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>520</th>\n",
       "      <td>中國</td>\n",
       "      <td>3.1</td>\n",
       "      <td>餐飲</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0340</td>\n",
       "      <td>0.0960</td>\n",
       "      <td>4.70</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>美林遠東有限公司 (相關往績)、瑞士信貸(香港)有限公司 (相關往績)</td>\n",
       "      <td>美林遠東有限公司、瑞士信貸(香港)有限公司</td>\n",
       "      <td>500.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.127660</td>\n",
       "      <td>4.999863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1669</th>\n",
       "      <td>香港</td>\n",
       "      <td>14.4</td>\n",
       "      <td>其他金融</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.2519</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.35</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>天達融資亞洲有限公司 (相關往績)</td>\n",
       "      <td>英皇證券(香港)有限公司、天達融資亞洲有限公司、金英証券(香港)有限公司、阿仕特朗資本管理有...</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.206897</td>\n",
       "      <td>0.580000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6869</th>\n",
       "      <td>全球</td>\n",
       "      <td>3.2</td>\n",
       "      <td>電訊及網絡器材</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0920</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>7.39</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中國國際金融香港證券有限公司 (相關往績)、高盛(亞洲)有限責任公司 (相關往績)</td>\n",
       "      <td>中國國際金融香港證券有限公司、高盛(亞洲)有限責任公司、建銀國際金融有限公司</td>\n",
       "      <td>500.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.327108</td>\n",
       "      <td>3.001230</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1816</th>\n",
       "      <td>中國</td>\n",
       "      <td>286.3</td>\n",
       "      <td>供電供熱</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1907</td>\n",
       "      <td>0.1739</td>\n",
       "      <td>2.78</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中國國際金融香港證券有限公司 (相關往績)、美林遠東有限公司 (相關往績)、農銀國際融資有限...</td>\n",
       "      <td>中國國際金融香港證券有限公司、美林遠東有限公司、農銀國際證券有限公司、摩根士丹利亞洲有限公司...</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.134357</td>\n",
       "      <td>28.736406</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1480</th>\n",
       "      <td>全球</td>\n",
       "      <td>33.7</td>\n",
       "      <td>工業用品</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1057</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.23</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>國泰君安融資有限公司 (相關往績)</td>\n",
       "      <td>國泰君安證券(香港)有限公司、長雄證券有限公司、六福證券(香港)有限公司、電訊數碼證券有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.136752</td>\n",
       "      <td>0.280800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1022</th>\n",
       "      <td>中國</td>\n",
       "      <td>4.0</td>\n",
       "      <td>電子商貿及互聯網服務</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0046</td>\n",
       "      <td>0.0979</td>\n",
       "      <td>2.20</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>花旗環球金融亞洲有限公司 (相關往績)、美林遠東有限公司 (相關往績)</td>\n",
       "      <td>花旗環球金融亞洲有限公司、Merrill Lynch International、美林遠東有...</td>\n",
       "      <td>1500.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.318182</td>\n",
       "      <td>3.314220</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1478</th>\n",
       "      <td>中國</td>\n",
       "      <td>2.1</td>\n",
       "      <td>資訊科技器材</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0609</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.79</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中信証券融資(香港)有限公司 (相關往績)</td>\n",
       "      <td>中信里昂證券有限公司、星展亞洲融資有限公司</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.253521</td>\n",
       "      <td>3.195000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6882</th>\n",
       "      <td>全球</td>\n",
       "      <td>103.0</td>\n",
       "      <td>旅遊及觀光</td>\n",
       "      <td>0.051</td>\n",
       "      <td>-0.0216</td>\n",
       "      <td>0.4904</td>\n",
       "      <td>1.39</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>30.0</td>\n",
       "      <td>申銀萬國融資(香港)有限公司 (相關往績)</td>\n",
       "      <td>申銀萬國融資(香港)有限公司、鎧盛證券有限公司、太平基業證券有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.129496</td>\n",
       "      <td>0.698406</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1317</th>\n",
       "      <td>中國</td>\n",
       "      <td>193.9</td>\n",
       "      <td>其他支援服務</td>\n",
       "      <td>0.501</td>\n",
       "      <td>0.0035</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>2.88</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>15.0</td>\n",
       "      <td>法國巴黎證券(亞洲)有限公司 (相關往績)、中信里昂證券資本市場有限公司 (相關往績)</td>\n",
       "      <td>法國巴黎證券(亞洲)有限公司、中信里昂證券有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.316981</td>\n",
       "      <td>3.535100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1305</th>\n",
       "      <td>中國</td>\n",
       "      <td>1222.0</td>\n",
       "      <td>資訊科技器材</td>\n",
       "      <td>0.150</td>\n",
       "      <td>-0.1196</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>3.68</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>200.0</td>\n",
       "      <td>長江證券融資(香港)有限公司 (相關往績)</td>\n",
       "      <td>長江證券經紀(香港)有限公司、興業僑豐證券有限公司、廣發證券(香港)經紀有限公司</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.208955</td>\n",
       "      <td>0.670000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1443</th>\n",
       "      <td>香港</td>\n",
       "      <td>42.5</td>\n",
       "      <td>餐飲</td>\n",
       "      <td>0.501</td>\n",
       "      <td>-0.1548</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.55</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>25.0</td>\n",
       "      <td>德意志證券亞洲有限公司 (相關往績)</td>\n",
       "      <td>德意志銀行、中銀國際亞洲有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.273973</td>\n",
       "      <td>1.898000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1289</th>\n",
       "      <td>中國</td>\n",
       "      <td>24.7</td>\n",
       "      <td>機械裝備及器材</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.4689</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>7.72</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>招商證券(香港)有限公司 (相關往績)</td>\n",
       "      <td>招商證券(香港)有限公司、平安證券有限公司、軟庫中華金融控股有限公司、太陽國際證券有限公司、...</td>\n",
       "      <td>500.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6118</th>\n",
       "      <td>中國</td>\n",
       "      <td>2.6</td>\n",
       "      <td>機械裝備及器材</td>\n",
       "      <td>0.100</td>\n",
       "      <td>0.1442</td>\n",
       "      <td>0.4543</td>\n",
       "      <td>3.12</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>200.0</td>\n",
       "      <td>海通國際資本有限公司 (相關往績)</td>\n",
       "      <td>海通國際證券有限公司、交銀國際證券有限公司、凱基金融亞洲有限公司、興業僑豐證券有限公司、軟庫...</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.306839</td>\n",
       "      <td>1.386534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6893</th>\n",
       "      <td>全球</td>\n",
       "      <td>859.0</td>\n",
       "      <td>美容及個人護理</td>\n",
       "      <td>0.300</td>\n",
       "      <td>0.1610</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>1.18</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>200.0</td>\n",
       "      <td>豐盛融資有限公司 (相關往績)</td>\n",
       "      <td>豐盛東方資本有限公司、興證(香港)融資有限公司</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.181818</td>\n",
       "      <td>0.880000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3822</th>\n",
       "      <td>香港</td>\n",
       "      <td>661.0</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>0.100</td>\n",
       "      <td>0.0800</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>1.50</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>150.0</td>\n",
       "      <td>天達融資亞洲有限公司 (相關往績)</td>\n",
       "      <td>天達融資亞洲有限公司、金利豐證券有限公司、國信證券(香港)融資有限公司、阿仕特朗資本管理有限...</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1462</th>\n",
       "      <td>香港</td>\n",
       "      <td>216.0</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>0.500</td>\n",
       "      <td>-0.0909</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>1.10</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>125.0</td>\n",
       "      <td>豐盛融資有限公司 (相關往績)</td>\n",
       "      <td>豐盛東方資本有限公司、康宏証券投資服務有限公司</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>0.360000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1347</th>\n",
       "      <td>全球</td>\n",
       "      <td>11.9</td>\n",
       "      <td>半導體</td>\n",
       "      <td>0.301</td>\n",
       "      <td>-0.0453</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>11.25</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>20.0</td>\n",
       "      <td>高盛(亞洲)有限責任公司 (相關往績)</td>\n",
       "      <td>高盛(亞洲)有限責任公司</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>紅籌</td>\n",
       "      <td>0.089936</td>\n",
       "      <td>12.070452</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6116</th>\n",
       "      <td>中國</td>\n",
       "      <td>0.0</td>\n",
       "      <td>服裝</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0014</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>13.98</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>中國國際金融香港證券有限公司 (相關往績)</td>\n",
       "      <td>中國國際金融香港證券有限公司、中信証券融資(香港)有限公司、富瑞金融集團香港有限公司、海通國...</td>\n",
       "      <td>200.0</td>\n",
       "      <td>H股</td>\n",
       "      <td>0.262275</td>\n",
       "      <td>3.624562</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1811</th>\n",
       "      <td>全球</td>\n",
       "      <td>556.3</td>\n",
       "      <td>供電供熱</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.1462</td>\n",
       "      <td>0.4348</td>\n",
       "      <td>1.71</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>25.0</td>\n",
       "      <td>摩根士丹利亞洲有限公司 (相關往績)</td>\n",
       "      <td>摩根士丹利亞洲有限公司、國泰君安證券（香港）有限公司、摩根大通証券（亞太）有限公司、中銀國際...</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>紅籌</td>\n",
       "      <td>0.096970</td>\n",
       "      <td>7.079860</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1395</th>\n",
       "      <td>中國</td>\n",
       "      <td>556.0</td>\n",
       "      <td>水務供應</td>\n",
       "      <td>0.300</td>\n",
       "      <td>0.7091</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.55</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>20.0</td>\n",
       "      <td>華富嘉洛企業融資有限公司 (相關往績)</td>\n",
       "      <td>華富嘉洛證券有限公司、康宏證券投資服務有限公司、益高證券有限公司、億聲證券有限公司、軟庫中華...</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.400000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1285</th>\n",
       "      <td>中國</td>\n",
       "      <td>27.5</td>\n",
       "      <td>包裝食品</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0514</td>\n",
       "      <td>0.2609</td>\n",
       "      <td>3.70</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>招商證券(香港)有限公司 (相關往績)</td>\n",
       "      <td>招商證券(香港)有限公司、第一上海證券有限公司、國泰君安證券(香港)有限公司、興證(香港)融...</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2221</th>\n",
       "      <td>香港</td>\n",
       "      <td>395.7</td>\n",
       "      <td>建築及裝修</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.3488</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.86</td>\n",
       "      <td>香港聯合交易所有限公司(主板)</td>\n",
       "      <td>1.0</td>\n",
       "      <td>鎧盛資本有限公司 (相關往績)</td>\n",
       "      <td>鎧盛證券有限公司、康宏証券投資服務有限公司、鴻鵬資本證券有限公司、天達融資亞洲有限公司、申銀...</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.181818</td>\n",
       "      <td>0.330000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>699</th>\n",
       "      <td>中國</td>\n",
       "      <td>201.1</td>\n",
       "      <td>公用運輸</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.2894</td>\n",
       "      <td>0.4348</td>\n",
       "      <td>8.50</td>\n",
       "      <td>香港聯合交易所有限公司 (主板)</td>\n",
       "      <td>10.0</td>\n",
       "      <td>摩根士丹利亞洲有限公司 (相關往績)、瑞士信貸(香港)有限公司 (相關往績)</td>\n",
       "      <td>摩根士丹利亞洲有限公司、瑞士信貸（香港）有限公司、中國國際金融香港證券有限公司、華興資本證券...</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>其他</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>18.860097</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>278 rows × 15 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      area  buy_ratio    category  draw_prob  firstday_performance  \\\n",
       "code                                                                 \n",
       "8465    全球       13.6        工業用品      1.000                0.0000   \n",
       "8427  馬來西亞       11.2     電訊及網絡器材      1.000                1.5000   \n",
       "1216    中國        0.0          銀行      1.000                0.0163   \n",
       "8291    中國       12.1          鋼鐵      0.903                0.0462   \n",
       "8472    香港       10.5      其他支援服務      1.000                0.1000   \n",
       "1676    中國        8.2        包裝食品      1.000                1.0000   \n",
       "1649    中國        0.0        供電供熱      1.000               -0.0125   \n",
       "8481    全球        0.3     家具及家居用品      1.000                0.4265   \n",
       "8462   新加坡        2.2      其他支援服務      1.000                0.0556   \n",
       "994     香港      416.9       建築及裝修      1.000                0.3023   \n",
       "8257    全球        2.6         半導體      1.000                0.0955   \n",
       "8463   新加坡        0.0      汽車及零部件      1.000               -0.1370   \n",
       "8297    香港        0.0          服裝      1.000               -0.1375   \n",
       "6088    全球        1.4      資訊科技器材      1.000                0.1667   \n",
       "8405    香港       37.9      其他支援服務      1.000                0.2361   \n",
       "6113  马来西亚        7.4      其他支援服務      1.000                0.0507   \n",
       "1962    全球        0.1     美容及個人護理      1.000               -0.2606   \n",
       "1702    中國        2.7        化肥農藥      0.701                0.5094   \n",
       "1695   東南亞        8.4   食品添加劑及調味料      0.401                1.5833   \n",
       "1932    香港        2.5        工業用品      1.000               -0.1047   \n",
       "8157    廈門        0.7       航運及港務      1.000               -0.0273   \n",
       "8469    中國        3.0        其他金融      1.000                0.1150   \n",
       "8362    香港       19.0        包裝食品      1.000               -0.2800   \n",
       "1571    中國       59.0      汽車及零部件      1.000               -0.0556   \n",
       "8460    香港        0.9       建築及裝修      1.000               -0.1583   \n",
       "1551    中國        0.0          銀行      1.000                0.0020   \n",
       "8420   新加坡        1.9        電訊服務      0.500                0.0000   \n",
       "1630    香港        4.8       建築及裝修      1.000                0.4211   \n",
       "8446    香港       10.6        影視娛樂      0.751                0.9667   \n",
       "6038    香港      741.3       建築及裝修      0.150                0.1098   \n",
       "...    ...        ...         ...        ...                   ...   \n",
       "1035    全球       48.3        生物科技      0.601                0.0000   \n",
       "2277    香港       26.9       建築及裝修      1.000                0.0500   \n",
       "2066    中國        1.2          銀行      1.000                0.0027   \n",
       "1381    中國       11.6        供電供熱      0.701                0.0043   \n",
       "3699    全球        4.3        地產發展      1.000               -0.0260   \n",
       "1958    中國        1.1      汽車及零部件      1.000               -0.0056   \n",
       "1438    全球       50.7          殯儀      1.000               -0.3000   \n",
       "520     中國        3.1          餐飲      1.000               -0.0340   \n",
       "1669    香港       14.4        其他金融      1.000                0.2519   \n",
       "6869    全球        3.2     電訊及網絡器材      1.000               -0.0920   \n",
       "1816    中國      286.3        供電供熱      1.000                0.1907   \n",
       "1480    全球       33.7        工業用品      1.000                0.1057   \n",
       "1022    中國        4.0  電子商貿及互聯網服務      1.000                0.0046   \n",
       "1478    中國        2.1      資訊科技器材      1.000               -0.0609   \n",
       "6882    全球      103.0       旅遊及觀光      0.051               -0.0216   \n",
       "1317    中國      193.9      其他支援服務      0.501                0.0035   \n",
       "1305    中國     1222.0      資訊科技器材      0.150               -0.1196   \n",
       "1443    香港       42.5          餐飲      0.501               -0.1548   \n",
       "1289    中國       24.7     機械裝備及器材      1.000                0.4689   \n",
       "6118    中國        2.6     機械裝備及器材      0.100                0.1442   \n",
       "6893    全球      859.0     美容及個人護理      0.300                0.1610   \n",
       "3822    香港      661.0       建築及裝修      0.100                0.0800   \n",
       "1462    香港      216.0       建築及裝修      0.500               -0.0909   \n",
       "1347    全球       11.9         半導體      0.301               -0.0453   \n",
       "6116    中國        0.0          服裝      1.000                0.0014   \n",
       "1811    全球      556.3        供電供熱      0.500                0.1462   \n",
       "1395    中國      556.0        水務供應      0.300                0.7091   \n",
       "1285    中國       27.5        包裝食品      1.000                0.0514   \n",
       "2221    香港      395.7       建築及裝修      1.000                0.3488   \n",
       "699     中國      201.1        公用運輸      0.500                0.2894   \n",
       "\n",
       "      hk_portion  ipo_price        market_type  one_hand  \\\n",
       "code                                                       \n",
       "8465      0.1000       1.68  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "8427      0.1000       0.28  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "1216      0.0386       2.45   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8291      0.5000       0.65  香港聯合交易所有限公司 (創業板)       2.0   \n",
       "8472      0.1000       0.50  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "1676      0.1000       0.66   香港聯合交易所有限公司 (主板)       1.0   \n",
       "1649      0.0494       1.60   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8481      0.1000       0.68  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "8462      0.1000       0.45  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "994       0.5000       0.86   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8257      0.1000       0.22  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "8463      0.2714       0.73  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "8297      1.0000       0.40  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "6088      0.1000       2.70   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8405      0.5000       0.72  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "6113      0.1000       1.38   香港聯合交易所有限公司 (主板)       1.0   \n",
       "1962      0.1000       1.65   香港聯合交易所有限公司 (主板)       1.0   \n",
       "1702      0.1000       1.06   香港聯合交易所有限公司 (主板)       3.0   \n",
       "1695      0.1000       0.48   香港聯合交易所有限公司 (主板)       7.0   \n",
       "1932      0.3456       0.86   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8157      1.0000       0.22  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "8469      0.1000       2.00   香港聯合交易所有限公司(創業板)       1.0   \n",
       "8362      1.0000       0.20  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "1571      0.4000       3.42   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8460      1.0000       0.24  香港聯合交易所有限公司 (創業板)       1.0   \n",
       "1551      0.0337       5.10   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8420      1.0000       0.48  香港聯合交易所有限公司 (創業板)       3.0   \n",
       "1630      0.1000       0.38   香港聯合交易所有限公司 (主板)       1.0   \n",
       "8446      0.1000       0.30  香港聯合交易所有限公司 (創業板)       8.0   \n",
       "6038      0.5000       0.41   香港聯合交易所有限公司 (主板)     200.0   \n",
       "...          ...        ...                ...       ...   \n",
       "1035      0.3000       1.75    香港聯合交易所有限公司(主板)       2.0   \n",
       "2277      0.3000       0.60   香港聯合交易所有限公司 (主板)       1.0   \n",
       "2066      0.0451       7.56    香港聯合交易所有限公司(主板)       1.0   \n",
       "1381      0.1000       2.33    香港聯合交易所有限公司(主板)       2.0   \n",
       "3699      0.0482      48.00    香港聯合交易所有限公司(主板)       1.0   \n",
       "1958      0.0464       8.90    香港聯合交易所有限公司(主板)       1.0   \n",
       "1438      0.4000       3.00    香港聯合交易所有限公司(主板)       1.0   \n",
       "520       0.0960       4.70    香港聯合交易所有限公司(主板)       1.0   \n",
       "1669      0.3000       1.35   香港聯合交易所有限公司 (主板)       1.0   \n",
       "6869      0.1000       7.39    香港聯合交易所有限公司(主板)       1.0   \n",
       "1816      0.1739       2.78    香港聯合交易所有限公司(主板)       1.0   \n",
       "1480      0.3000       1.23   香港聯合交易所有限公司 (主板)       1.0   \n",
       "1022      0.0979       2.20    香港聯合交易所有限公司(主板)       1.0   \n",
       "1478      0.1000       2.79    香港聯合交易所有限公司(主板)       1.0   \n",
       "6882      0.4904       1.39    香港聯合交易所有限公司(主板)      30.0   \n",
       "1317      0.5000       2.88    香港聯合交易所有限公司(主板)      15.0   \n",
       "1305      0.5000       3.68   香港聯合交易所有限公司 (主板)     200.0   \n",
       "1443      0.3000       1.55   香港聯合交易所有限公司 (主板)      25.0   \n",
       "1289      0.3000       7.72   香港聯合交易所有限公司 (主板)       1.0   \n",
       "6118      0.4543       3.12   香港聯合交易所有限公司 (主板)     200.0   \n",
       "6893      0.5000       1.18    香港聯合交易所有限公司(主板)     200.0   \n",
       "3822      0.5000       1.50   香港聯合交易所有限公司 (主板)     150.0   \n",
       "1462      0.5000       1.10   香港聯合交易所有限公司 (主板)     125.0   \n",
       "1347      0.1000      11.25   香港聯合交易所有限公司 (主板)      20.0   \n",
       "6116      0.0833      13.98   香港聯合交易所有限公司 (主板)       1.0   \n",
       "1811      0.4348       1.71    香港聯合交易所有限公司(主板)      25.0   \n",
       "1395      0.5000       0.55   香港聯合交易所有限公司 (主板)      20.0   \n",
       "1285      0.2609       3.70    香港聯合交易所有限公司(主板)       1.0   \n",
       "2221      0.5000       0.86    香港聯合交易所有限公司(主板)       1.0   \n",
       "699       0.4348       8.50   香港聯合交易所有限公司 (主板)      10.0   \n",
       "\n",
       "                                            recommender  \\\n",
       "code                                                      \n",
       "8465                                  工銀國際融資有限公司 (相關往績)   \n",
       "8427                                  興業金融融資有限公司 (相關往績)   \n",
       "1216  中信里昂證券資本市場有限公司 (相關往績)、摩根大通證券(遠東)有限公司 (相關往績)、建銀...   \n",
       "8291                                   高企業融資有限公司 (相關往績)   \n",
       "8472                                    八方金融有限公司 (相關往績)   \n",
       "1676                                東興證券(香港)有限公司 (相關往績)   \n",
       "1649                              中國國際金融香港證券有限公司 (相關往績)   \n",
       "8481                                    大有融資有限公司 (相關往績)   \n",
       "8462                                    創僑國際有限公司 (相關往績)   \n",
       "994                                   凱基金融亞洲有限公司 (相關往績)   \n",
       "8257                                    豐盛融資有限公司 (相關往績)   \n",
       "8463                                  富強金融資本有限公司 (相關往績)   \n",
       "8297                                  力高企業融資有限公司 (相關往績)   \n",
       "6088  中國國際金融香港證券有限公司 (相關往績)、瑞士信貸(香港)有限公司 (相關往績)、美林遠東...   \n",
       "8405                                  國泰君安融資有限公司 (相關往績)   \n",
       "6113                                    創僑國際有限公司 (相關往績)   \n",
       "1962                                    聯昌證券有限公司 (相關往績)   \n",
       "1702                                  凱基金融亞洲有限公司 (相關往績)   \n",
       "1695                                東興證券(香港)有限公司 (相關往績)   \n",
       "1932                                    創陞融資有限公司 (相關往績)   \n",
       "8157                                  中州國際融資有限公司 (相關往績)   \n",
       "8469                                    德健融資有限公司 (相關往績)   \n",
       "8362                                    滙富融資有限公司 (相關往績)   \n",
       "1571                              法國巴黎證券(亞洲)有限公司 (相關往績)   \n",
       "8460                                    富比資本有限公司 (相關往績)   \n",
       "1551  中國國際金融香港證券有限公司 (相關往績)、招商證券(香港)有限公司 (相關往績)、建銀國際...   \n",
       "8420                                西證(香港)融資有限公司 (相關往績)   \n",
       "1630                                    德健融資有限公司 (相關往績)   \n",
       "8446                              申萬宏源融資(香港)有限公司 (相關往績)   \n",
       "6038                                    大有融資有限公司 (相關往績)   \n",
       "...                                                 ...   \n",
       "1035                                  海通國際資本有限公司 (相關往績)   \n",
       "2277                                    大有融資有限公司 (相關往績)   \n",
       "2066                                招商證券(香港)有限公司 (相關往績)   \n",
       "1381                                招商證券(香港)有限公司 (相關往績)   \n",
       "3699  中國國際金融香港證券有限公司 (相關往績)、HSBC Corporate Finance (...   \n",
       "1958  HSBC Corporate Finance (Hong Kong) Limited (相關...   \n",
       "1438                瑞銀證券香港有限公司 (相關往績)、星展亞洲融資有限公司 (相關往績)   \n",
       "520                 美林遠東有限公司 (相關往績)、瑞士信貸(香港)有限公司 (相關往績)   \n",
       "1669                                  天達融資亞洲有限公司 (相關往績)   \n",
       "6869          中國國際金融香港證券有限公司 (相關往績)、高盛(亞洲)有限責任公司 (相關往績)   \n",
       "1816  中國國際金融香港證券有限公司 (相關往績)、美林遠東有限公司 (相關往績)、農銀國際融資有限...   \n",
       "1480                                  國泰君安融資有限公司 (相關往績)   \n",
       "1022                花旗環球金融亞洲有限公司 (相關往績)、美林遠東有限公司 (相關往績)   \n",
       "1478                              中信証券融資(香港)有限公司 (相關往績)   \n",
       "6882                              申銀萬國融資(香港)有限公司 (相關往績)   \n",
       "1317        法國巴黎證券(亞洲)有限公司 (相關往績)、中信里昂證券資本市場有限公司 (相關往績)   \n",
       "1305                              長江證券融資(香港)有限公司 (相關往績)   \n",
       "1443                                 德意志證券亞洲有限公司 (相關往績)   \n",
       "1289                                招商證券(香港)有限公司 (相關往績)   \n",
       "6118                                  海通國際資本有限公司 (相關往績)   \n",
       "6893                                    豐盛融資有限公司 (相關往績)   \n",
       "3822                                  天達融資亞洲有限公司 (相關往績)   \n",
       "1462                                    豐盛融資有限公司 (相關往績)   \n",
       "1347                                高盛(亞洲)有限責任公司 (相關往績)   \n",
       "6116                              中國國際金融香港證券有限公司 (相關往績)   \n",
       "1811                                 摩根士丹利亞洲有限公司 (相關往績)   \n",
       "1395                                華富嘉洛企業融資有限公司 (相關往績)   \n",
       "1285                                招商證券(香港)有限公司 (相關往績)   \n",
       "2221                                    鎧盛資本有限公司 (相關往績)   \n",
       "699              摩根士丹利亞洲有限公司 (相關往績)、瑞士信貸(香港)有限公司 (相關往績)   \n",
       "\n",
       "                                                  sales  shares_per_hand  \\\n",
       "code                                                                       \n",
       "8465                                工銀國際證券有限公司、創僑證券有限公司           2000.0   \n",
       "8427                       豐盛東方資本有限公司、潮商證券有限公司、智華證券有限公司           8000.0   \n",
       "1216  中信里昂、摩根大通、建銀國際、招銀國際、交銀國際、廣發証券、中州國際、海通國際、浦銀國際、首控證券           1000.0   \n",
       "8291                                  力高證券有限公司、擎天證券有限公司           5000.0   \n",
       "8472                            興證國際金融集團有限公司、鴻鵬資本證券有限公司           5000.0   \n",
       "1676                    東興證券(香港)有限公司、富滙證券有限公司、雅利多證券有限公司           4000.0   \n",
       "1649                          中國國際金融香港證券有限公司、中銀國際亞洲有限公司           2000.0   \n",
       "8481  阿仕特朗資本管理有限公司、鼎成證券有限公司、中國建信金融服務有限公司、創陞證券有限公司、華邦...           5000.0   \n",
       "8462                                         太平基業證券有限公司           5000.0   \n",
       "994                      凱基金融亞洲有限公司、鴻鵬資本證券有限公司、鼎珮證券有限公司           4000.0   \n",
       "8257                      豐盛東方資本有限公司、潮商證券有限公司、中港通證券有限公司          10000.0   \n",
       "8463                 太平基業證券有限公司、阿仕特朗資本管理有限公司、豐盛東方資本有限公司           4000.0   \n",
       "8297  博恩證劵有限公司、中國銀河國際證券(香港)有限公司、康宏証券投資服務有限公司、力高證券有限公...           5000.0   \n",
       "6088  中國國際金融香港證券有限公司、瑞士信貸(香港)有限公司、Merrill Lynch Far ...           1000.0   \n",
       "8405                   國泰君安證券(香港)有限公司、平安證券有限公司、同人融資有限公司           4000.0   \n",
       "6113                     創僑證券有限公司、平安證券有限公司、興業金融(香港)有限公司           2000.0   \n",
       "1962  聯昌證券有限公司、國泰君安證券(香港)有限公司、富強證券有限公司、中國銀河國際證券(香港)有...           2000.0   \n",
       "1702    凱基金融亞洲有限公司、國泰君安證券(香港)有限公司、匯盈證券有限公司、東興證券(香港)有限公司           4000.0   \n",
       "1695  雅利多證券有限公司、瑞邦證券有限公司、東興證券(香港)有限公司、博思融資有限公司、易易壹證券...           5000.0   \n",
       "1932  創陞證券有限公司、國金證券(香港)有限公司、鼎成證券有限公司、中金三甲證券、中募金融資管、國...           4000.0   \n",
       "8157          中州國際融資有限公司、潮商證券有限公司、豐盛東方資本有限公司、太平基業證券有限公司          20000.0   \n",
       "8469                         德健證券有限公司、聯合證券有限公司、潮商證券有限公司           2000.0   \n",
       "8362                                滙富金融服務有限公司、平安證券有限公司          20000.0   \n",
       "1571               法國巴黎證券(亞洲)有限公司、農銀國際證券有限公司、太平基業證券有限公司           1000.0   \n",
       "8460                                  富比資本有限公司、智華證券有限公司          10000.0   \n",
       "1551  中國國際金融香港證券有限公司、招商證券(香港)有限公司、農銀國際融資有限公司、建銀國際金融有...           1000.0   \n",
       "8420  西證(香港)證券經紀有限公司、方正證券(香港)有限公司、雅利多證券有限公司、國金證券(香港)...           5000.0   \n",
       "1630                                  德健證券有限公司、潮商證劵有限公司           6000.0   \n",
       "8446                                         太平基業證券有限公司          10000.0   \n",
       "6038    雅利多證券有限公司、南華證券投資有限公司、瑞邦證券有限公司、中佳證券有限公司、創富融資有限公司          10000.0   \n",
       "...                                                 ...              ...   \n",
       "1035                                         海通國際證券有限公司           1500.0   \n",
       "2277                                         東方匯財證券有限公司           5000.0   \n",
       "2066  招商證券(香港)有限公司、大華繼顯(香港)有限公司、建銀國際金融有限公司、盛源證券有限公司、...            500.0   \n",
       "1381                              招商證券(香港)有限公司、高富金融有限公司           1000.0   \n",
       "3699  中國國際金融香港證券有限公司、高盛(亞洲)有限責任公司、瑞士銀行、香港上海匯豐銀行有限公司、...            100.0   \n",
       "1958  德意志銀行、The Hongkong and Shanghai Banking Corpor...            500.0   \n",
       "1438                           瑞士銀行、星展亞洲融資有限公司、聯昌證券有限公司           1000.0   \n",
       "520                               美林遠東有限公司、瑞士信貸(香港)有限公司            500.0   \n",
       "1669  英皇證券(香港)有限公司、天達融資亞洲有限公司、金英証券(香港)有限公司、阿仕特朗資本管理有...           2000.0   \n",
       "6869             中國國際金融香港證券有限公司、高盛(亞洲)有限責任公司、建銀國際金融有限公司            500.0   \n",
       "1816  中國國際金融香港證券有限公司、美林遠東有限公司、農銀國際證券有限公司、摩根士丹利亞洲有限公司...           1000.0   \n",
       "1480    國泰君安證券(香港)有限公司、長雄證券有限公司、六福證券(香港)有限公司、電訊數碼證券有限公司           2000.0   \n",
       "1022  花旗環球金融亞洲有限公司、Merrill Lynch International、美林遠東有...           1500.0   \n",
       "1478                              中信里昂證券有限公司、星展亞洲融資有限公司           1000.0   \n",
       "6882                 申銀萬國融資(香港)有限公司、鎧盛證券有限公司、太平基業證券有限公司           2000.0   \n",
       "1317                          法國巴黎證券(亞洲)有限公司、中信里昂證券有限公司           2000.0   \n",
       "1305           長江證券經紀(香港)有限公司、興業僑豐證券有限公司、廣發證券(香港)經紀有限公司           1000.0   \n",
       "1443                                   德意志銀行、中銀國際亞洲有限公司           2000.0   \n",
       "1289  招商證券(香港)有限公司、平安證券有限公司、軟庫中華金融控股有限公司、太陽國際證券有限公司、...            500.0   \n",
       "6118  海通國際證券有限公司、交銀國際證券有限公司、凱基金融亞洲有限公司、興業僑豐證券有限公司、軟庫...           1000.0   \n",
       "6893                            豐盛東方資本有限公司、興證(香港)融資有限公司           2000.0   \n",
       "3822  天達融資亞洲有限公司、金利豐證券有限公司、國信證券(香港)融資有限公司、阿仕特朗資本管理有限...           2000.0   \n",
       "1462                            豐盛東方資本有限公司、康宏証券投資服務有限公司           4000.0   \n",
       "1347                                       高盛(亞洲)有限責任公司           1000.0   \n",
       "6116  中國國際金融香港證券有限公司、中信証券融資(香港)有限公司、富瑞金融集團香港有限公司、海通國...            200.0   \n",
       "1811  摩根士丹利亞洲有限公司、國泰君安證券（香港）有限公司、摩根大通証券（亞太）有限公司、中銀國際...           2000.0   \n",
       "1395  華富嘉洛證券有限公司、康宏證券投資服務有限公司、益高證券有限公司、億聲證券有限公司、軟庫中華...           5000.0   \n",
       "1285  招商證券(香港)有限公司、第一上海證券有限公司、國泰君安證券(香港)有限公司、興證(香港)融...           1000.0   \n",
       "2221  鎧盛證券有限公司、康宏証券投資服務有限公司、鴻鵬資本證券有限公司、天達融資亞洲有限公司、申銀...           4000.0   \n",
       "699   摩根士丹利亞洲有限公司、瑞士信貸（香港）有限公司、中國國際金融香港證券有限公司、華興資本證券...           1000.0   \n",
       "\n",
       "     stock_type  ipo_price_range_ratio  total_value_mid  \n",
       "code                                                     \n",
       "8465         其他               0.372881         0.536900  \n",
       "8427         其他               0.214286         0.173600  \n",
       "1216         H股               0.044444         8.167500  \n",
       "8291         其他               0.333333         0.240000  \n",
       "8472         其他               0.000000              NaN  \n",
       "1676         其他               0.349650         0.715000  \n",
       "1649         H股               0.048780         1.262800  \n",
       "8481         其他               0.370370         0.337500  \n",
       "8462         其他               0.200000         0.300000  \n",
       "994          其他               0.222222         0.478080  \n",
       "8257         其他               0.370370         0.270000  \n",
       "8463         其他               0.191781         0.328500  \n",
       "8297         其他               0.400000         0.240000  \n",
       "6088         其他               0.256410        17.977994  \n",
       "8405         其他               0.133333         0.300000  \n",
       "6113         其他               0.153846         0.520000  \n",
       "1962         其他               0.140845         1.091625  \n",
       "1702         其他               0.264151         0.657200  \n",
       "1695         其他               0.166667         0.518400  \n",
       "1932         其他               0.072289         0.861125  \n",
       "8157         其他               0.240000         0.250000  \n",
       "8469         其他               0.200000         1.480000  \n",
       "8362         其他               0.200000         0.280000  \n",
       "1571         其他               0.088550         3.275000  \n",
       "8460         其他               0.181818         0.220000  \n",
       "1551         H股               0.054581        50.316418  \n",
       "8420         其他               0.200000         0.300000  \n",
       "1630         其他               0.100000         0.600000  \n",
       "8446         其他               0.000000              NaN  \n",
       "6038         其他               0.048780         0.410000  \n",
       "...         ...                    ...              ...  \n",
       "1035         其他               0.344828         0.988990  \n",
       "2277         其他               0.000000              NaN  \n",
       "2066         H股               0.049869        11.740458  \n",
       "1381         其他               0.000000              NaN  \n",
       "3699         H股               0.170678       206.899785  \n",
       "1958         H股               0.252874        18.276009  \n",
       "1438         其他               0.119122         8.609156  \n",
       "520          其他               0.127660         4.999863  \n",
       "1669         其他               0.206897         0.580000  \n",
       "6869         H股               0.327108         3.001230  \n",
       "1816         H股               0.134357        28.736406  \n",
       "1480         其他               0.136752         0.280800  \n",
       "1022         其他               0.318182         3.314220  \n",
       "1478         其他               0.253521         3.195000  \n",
       "6882         其他               0.129496         0.698406  \n",
       "1317         其他               0.316981         3.535100  \n",
       "1305         其他               0.208955         0.670000  \n",
       "1443         其他               0.273973         1.898000  \n",
       "1289         H股               0.000000              NaN  \n",
       "6118         其他               0.306839         1.386534  \n",
       "6893         其他               0.181818         0.880000  \n",
       "3822         其他               0.400000         0.500000  \n",
       "1462         其他               0.444444         0.360000  \n",
       "1347         紅籌               0.089936        12.070452  \n",
       "6116         H股               0.262275         3.624562  \n",
       "1811         紅籌               0.096970         7.079860  \n",
       "1395         其他               0.400000         0.400000  \n",
       "1285         其他               0.000000              NaN  \n",
       "2221         其他               0.181818         0.330000  \n",
       "699          其他               0.125000        18.860097  \n",
       "\n",
       "[278 rows x 15 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Now use dataframe and do some feature engineering\n",
    "# Drop unrelated columns\n",
    "to_del = ['date', 'banks', 'eipo', 'name', 'now_price', 'website', 'total_performance','predict_profile_market_ratio', 'predict_profit_ratio', 'profit_ratio']\n",
    "for item in to_del:\n",
    "    del df[item]\n",
    "\n",
    "#Drop non_public ipo stocks\n",
    "df = df[df.draw_prob.notnull()]\n",
    "\n",
    "\n",
    "def buy_ratio_process(x):\n",
    "    if x == '認購不足':\n",
    "        return 0.0\n",
    "    else:\n",
    "        return float(x)\n",
    "\n",
    "def hk_portion_process(x):\n",
    "    if not pd.isnull(x):\n",
    "        x = x.split('(')[1].strip(')')\n",
    "        return x.strip()\n",
    "    else:\n",
    "        return x\n",
    "    \n",
    "def per2float(x):\n",
    "    if not pd.isnull(x):\n",
    "        x = x.strip('%')\n",
    "        return float(x)/100.\n",
    "    else:\n",
    "        return x\n",
    "\n",
    "def get_low_bound(x):\n",
    "    if ',' in str(x):\n",
    "        x = x.replace(',', '')\n",
    "    try:\n",
    "        if pd.isnull(x) or '-' not in x:\n",
    "            return float(x)\n",
    "        else:\n",
    "            x = x.split('-')\n",
    "            return float(x[0])\n",
    "    except Exception as e:\n",
    "        print e\n",
    "        print x\n",
    "\n",
    "def get_up_bound(x):\n",
    "    if ',' in str(x):\n",
    "        x = x.replace(',', '')\n",
    "    try:\n",
    "        if pd.isnull(x) or '-' not in x:\n",
    "            return float(x)\n",
    "        else:\n",
    "            x = x.split('-')\n",
    "            return float(x[1])\n",
    "    except Exception as e:\n",
    "        print e\n",
    "        print x\n",
    "        \n",
    "def get_ipo_range_prop(x):\n",
    "    if pd.isnull(x):\n",
    "        return x\n",
    "    low_bound = get_low_bound(x)\n",
    "    up_bound = get_up_bound(x)\n",
    "    return (up_bound-low_bound)*2/(up_bound+low_bound)\n",
    "\n",
    "def get_total_value_mid(x):\n",
    "    if pd.isnull(x):\n",
    "        return x\n",
    "    low_bound = get_low_bound(x)\n",
    "    up_bound = get_up_bound(x)\n",
    "    return (up_bound+low_bound)/2\n",
    "    \n",
    "#Format buy_ratio\n",
    "df['buy_ratio'] = df['buy_ratio'].apply(buy_ratio_process)\n",
    "\n",
    "#Format hk-porrtion\n",
    "df['hk_portion'] = df['hk_portion'].apply(hk_portion_process)\n",
    "\n",
    "#Format percentage\n",
    "df['draw_prob'] = df['draw_prob'].apply(per2float)\n",
    "df['firstday_performance'] = df['firstday_performance'].apply(per2float)\n",
    "df['hk_portion'] = df['hk_portion'].apply(per2float)\n",
    "\n",
    "#Split range to two columns\n",
    "#df['ipo_price_low_bound'] = df['ipo_price_range'].apply(get_low_bound)\n",
    "#df['ipo_price_up_bound'] = df['ipo_price_range'].apply(get_up_bound)\n",
    "#del df['ipo_price_range']\n",
    "#df['total_value_low_bound'] = df['total_value'].apply(get_low_bound)/1000000000.\n",
    "#df['total_value_up_bound'] = df['total_value'].apply(get_up_bound)/1000000000.\n",
    "#del df['total_value']\n",
    "\n",
    "\n",
    "#Merge ipo_price_range to proportion of middle\n",
    "df['ipo_price_range_ratio'] = df['ipo_price_range'].apply(get_ipo_range_prop)\n",
    "del df['ipo_price_range']\n",
    "df['total_value_mid'] = df['total_value'].apply(get_total_value_mid)/1000000000.\n",
    "del df['total_value']\n",
    "\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>buy_ratio</th>\n",
       "      <th>draw_prob</th>\n",
       "      <th>firstday_performance</th>\n",
       "      <th>hk_portion</th>\n",
       "      <th>ipo_price</th>\n",
       "      <th>one_hand</th>\n",
       "      <th>shares_per_hand</th>\n",
       "      <th>ipo_price_range_ratio</th>\n",
       "      <th>total_value_mid</th>\n",
       "      <th>area_大中華</th>\n",
       "      <th>...</th>\n",
       "      <th>sales_招商(香港)</th>\n",
       "      <th>sales_太平基業證券</th>\n",
       "      <th>sales_寶威證券有限公司</th>\n",
       "      <th>sales_中天證券有限公司</th>\n",
       "      <th>sales_中國光大證券(香港)有限公司</th>\n",
       "      <th>sales_中州國際</th>\n",
       "      <th>sales_瑞士信貸</th>\n",
       "      <th>stock_type_紅籌</th>\n",
       "      <th>stock_type_H股</th>\n",
       "      <th>stock_type_其他</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>8465</th>\n",
       "      <td>13.6</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.68</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.372881</td>\n",
       "      <td>0.536900</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8427</th>\n",
       "      <td>11.2</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.5000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.28</td>\n",
       "      <td>1.0</td>\n",
       "      <td>8000.0</td>\n",
       "      <td>0.214286</td>\n",
       "      <td>0.173600</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1216</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0163</td>\n",
       "      <td>0.0386</td>\n",
       "      <td>2.45</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.044444</td>\n",
       "      <td>8.167500</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8291</th>\n",
       "      <td>12.1</td>\n",
       "      <td>0.903</td>\n",
       "      <td>0.0462</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.65</td>\n",
       "      <td>2.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.333333</td>\n",
       "      <td>0.240000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8472</th>\n",
       "      <td>10.5</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.50</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1676</th>\n",
       "      <td>8.2</td>\n",
       "      <td>1.000</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.66</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.349650</td>\n",
       "      <td>0.715000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1649</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0125</td>\n",
       "      <td>0.0494</td>\n",
       "      <td>1.60</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.048780</td>\n",
       "      <td>1.262800</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8481</th>\n",
       "      <td>0.3</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.4265</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.68</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.370370</td>\n",
       "      <td>0.337500</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8462</th>\n",
       "      <td>2.2</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0556</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.45</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>0.300000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>994</th>\n",
       "      <td>416.9</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.3023</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.86</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.222222</td>\n",
       "      <td>0.478080</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8257</th>\n",
       "      <td>2.6</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0955</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.22</td>\n",
       "      <td>1.0</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>0.370370</td>\n",
       "      <td>0.270000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8463</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1370</td>\n",
       "      <td>0.2714</td>\n",
       "      <td>0.73</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.191781</td>\n",
       "      <td>0.328500</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8297</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1375</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.40</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.240000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6088</th>\n",
       "      <td>1.4</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1667</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.70</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.256410</td>\n",
       "      <td>17.977994</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8405</th>\n",
       "      <td>37.9</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.2361</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.72</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.133333</td>\n",
       "      <td>0.300000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6113</th>\n",
       "      <td>7.4</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0507</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.38</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.153846</td>\n",
       "      <td>0.520000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1962</th>\n",
       "      <td>0.1</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.2606</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.65</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.140845</td>\n",
       "      <td>1.091625</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1702</th>\n",
       "      <td>2.7</td>\n",
       "      <td>0.701</td>\n",
       "      <td>0.5094</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>1.06</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.264151</td>\n",
       "      <td>0.657200</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1695</th>\n",
       "      <td>8.4</td>\n",
       "      <td>0.401</td>\n",
       "      <td>1.5833</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.48</td>\n",
       "      <td>7.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>0.518400</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1932</th>\n",
       "      <td>2.5</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1047</td>\n",
       "      <td>0.3456</td>\n",
       "      <td>0.86</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.072289</td>\n",
       "      <td>0.861125</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8157</th>\n",
       "      <td>0.7</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0273</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.22</td>\n",
       "      <td>1.0</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>0.240000</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8469</th>\n",
       "      <td>3.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1150</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.00</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>1.480000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8362</th>\n",
       "      <td>19.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.2800</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.20</td>\n",
       "      <td>1.0</td>\n",
       "      <td>20000.0</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>0.280000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1571</th>\n",
       "      <td>59.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0556</td>\n",
       "      <td>0.4000</td>\n",
       "      <td>3.42</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.088550</td>\n",
       "      <td>3.275000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8460</th>\n",
       "      <td>0.9</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.1583</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.24</td>\n",
       "      <td>1.0</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>0.181818</td>\n",
       "      <td>0.220000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1551</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0020</td>\n",
       "      <td>0.0337</td>\n",
       "      <td>5.10</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.054581</td>\n",
       "      <td>50.316418</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8420</th>\n",
       "      <td>1.9</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>1.0000</td>\n",
       "      <td>0.48</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>0.300000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1630</th>\n",
       "      <td>4.8</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.4211</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.38</td>\n",
       "      <td>1.0</td>\n",
       "      <td>6000.0</td>\n",
       "      <td>0.100000</td>\n",
       "      <td>0.600000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8446</th>\n",
       "      <td>10.6</td>\n",
       "      <td>0.751</td>\n",
       "      <td>0.9667</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>0.30</td>\n",
       "      <td>8.0</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6038</th>\n",
       "      <td>741.3</td>\n",
       "      <td>0.150</td>\n",
       "      <td>0.1098</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.41</td>\n",
       "      <td>200.0</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>0.048780</td>\n",
       "      <td>0.410000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1035</th>\n",
       "      <td>48.3</td>\n",
       "      <td>0.601</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.75</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1500.0</td>\n",
       "      <td>0.344828</td>\n",
       "      <td>0.988990</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2277</th>\n",
       "      <td>26.9</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0500</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>0.60</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2066</th>\n",
       "      <td>1.2</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0027</td>\n",
       "      <td>0.0451</td>\n",
       "      <td>7.56</td>\n",
       "      <td>1.0</td>\n",
       "      <td>500.0</td>\n",
       "      <td>0.049869</td>\n",
       "      <td>11.740458</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1381</th>\n",
       "      <td>11.6</td>\n",
       "      <td>0.701</td>\n",
       "      <td>0.0043</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.33</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3699</th>\n",
       "      <td>4.3</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0260</td>\n",
       "      <td>0.0482</td>\n",
       "      <td>48.00</td>\n",
       "      <td>1.0</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.170678</td>\n",
       "      <td>206.899785</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1958</th>\n",
       "      <td>1.1</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0056</td>\n",
       "      <td>0.0464</td>\n",
       "      <td>8.90</td>\n",
       "      <td>1.0</td>\n",
       "      <td>500.0</td>\n",
       "      <td>0.252874</td>\n",
       "      <td>18.276009</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1438</th>\n",
       "      <td>50.7</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.3000</td>\n",
       "      <td>0.4000</td>\n",
       "      <td>3.00</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.119122</td>\n",
       "      <td>8.609156</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>520</th>\n",
       "      <td>3.1</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0340</td>\n",
       "      <td>0.0960</td>\n",
       "      <td>4.70</td>\n",
       "      <td>1.0</td>\n",
       "      <td>500.0</td>\n",
       "      <td>0.127660</td>\n",
       "      <td>4.999863</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1669</th>\n",
       "      <td>14.4</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.2519</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.35</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.206897</td>\n",
       "      <td>0.580000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6869</th>\n",
       "      <td>3.2</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0920</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>7.39</td>\n",
       "      <td>1.0</td>\n",
       "      <td>500.0</td>\n",
       "      <td>0.327108</td>\n",
       "      <td>3.001230</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1816</th>\n",
       "      <td>286.3</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1907</td>\n",
       "      <td>0.1739</td>\n",
       "      <td>2.78</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.134357</td>\n",
       "      <td>28.736406</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1480</th>\n",
       "      <td>33.7</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.1057</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.23</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.136752</td>\n",
       "      <td>0.280800</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1022</th>\n",
       "      <td>4.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0046</td>\n",
       "      <td>0.0979</td>\n",
       "      <td>2.20</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1500.0</td>\n",
       "      <td>0.318182</td>\n",
       "      <td>3.314220</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1478</th>\n",
       "      <td>2.1</td>\n",
       "      <td>1.000</td>\n",
       "      <td>-0.0609</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>2.79</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.253521</td>\n",
       "      <td>3.195000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6882</th>\n",
       "      <td>103.0</td>\n",
       "      <td>0.051</td>\n",
       "      <td>-0.0216</td>\n",
       "      <td>0.4904</td>\n",
       "      <td>1.39</td>\n",
       "      <td>30.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.129496</td>\n",
       "      <td>0.698406</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1317</th>\n",
       "      <td>193.9</td>\n",
       "      <td>0.501</td>\n",
       "      <td>0.0035</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>2.88</td>\n",
       "      <td>15.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.316981</td>\n",
       "      <td>3.535100</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1305</th>\n",
       "      <td>1222.0</td>\n",
       "      <td>0.150</td>\n",
       "      <td>-0.1196</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>3.68</td>\n",
       "      <td>200.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.208955</td>\n",
       "      <td>0.670000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1443</th>\n",
       "      <td>42.5</td>\n",
       "      <td>0.501</td>\n",
       "      <td>-0.1548</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>1.55</td>\n",
       "      <td>25.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.273973</td>\n",
       "      <td>1.898000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1289</th>\n",
       "      <td>24.7</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.4689</td>\n",
       "      <td>0.3000</td>\n",
       "      <td>7.72</td>\n",
       "      <td>1.0</td>\n",
       "      <td>500.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6118</th>\n",
       "      <td>2.6</td>\n",
       "      <td>0.100</td>\n",
       "      <td>0.1442</td>\n",
       "      <td>0.4543</td>\n",
       "      <td>3.12</td>\n",
       "      <td>200.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.306839</td>\n",
       "      <td>1.386534</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6893</th>\n",
       "      <td>859.0</td>\n",
       "      <td>0.300</td>\n",
       "      <td>0.1610</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>1.18</td>\n",
       "      <td>200.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.181818</td>\n",
       "      <td>0.880000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3822</th>\n",
       "      <td>661.0</td>\n",
       "      <td>0.100</td>\n",
       "      <td>0.0800</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>1.50</td>\n",
       "      <td>150.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1462</th>\n",
       "      <td>216.0</td>\n",
       "      <td>0.500</td>\n",
       "      <td>-0.0909</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>1.10</td>\n",
       "      <td>125.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>0.360000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1347</th>\n",
       "      <td>11.9</td>\n",
       "      <td>0.301</td>\n",
       "      <td>-0.0453</td>\n",
       "      <td>0.1000</td>\n",
       "      <td>11.25</td>\n",
       "      <td>20.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.089936</td>\n",
       "      <td>12.070452</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6116</th>\n",
       "      <td>0.0</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0014</td>\n",
       "      <td>0.0833</td>\n",
       "      <td>13.98</td>\n",
       "      <td>1.0</td>\n",
       "      <td>200.0</td>\n",
       "      <td>0.262275</td>\n",
       "      <td>3.624562</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1811</th>\n",
       "      <td>556.3</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.1462</td>\n",
       "      <td>0.4348</td>\n",
       "      <td>1.71</td>\n",
       "      <td>25.0</td>\n",
       "      <td>2000.0</td>\n",
       "      <td>0.096970</td>\n",
       "      <td>7.079860</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1395</th>\n",
       "      <td>556.0</td>\n",
       "      <td>0.300</td>\n",
       "      <td>0.7091</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.55</td>\n",
       "      <td>20.0</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1285</th>\n",
       "      <td>27.5</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.0514</td>\n",
       "      <td>0.2609</td>\n",
       "      <td>3.70</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2221</th>\n",
       "      <td>395.7</td>\n",
       "      <td>1.000</td>\n",
       "      <td>0.3488</td>\n",
       "      <td>0.5000</td>\n",
       "      <td>0.86</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4000.0</td>\n",
       "      <td>0.181818</td>\n",
       "      <td>0.330000</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>699</th>\n",
       "      <td>201.1</td>\n",
       "      <td>0.500</td>\n",
       "      <td>0.2894</td>\n",
       "      <td>0.4348</td>\n",
       "      <td>8.50</td>\n",
       "      <td>10.0</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>18.860097</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>278 rows × 535 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      buy_ratio  draw_prob  firstday_performance  hk_portion  ipo_price  \\\n",
       "code                                                                      \n",
       "8465       13.6      1.000                0.0000      0.1000       1.68   \n",
       "8427       11.2      1.000                1.5000      0.1000       0.28   \n",
       "1216        0.0      1.000                0.0163      0.0386       2.45   \n",
       "8291       12.1      0.903                0.0462      0.5000       0.65   \n",
       "8472       10.5      1.000                0.1000      0.1000       0.50   \n",
       "1676        8.2      1.000                1.0000      0.1000       0.66   \n",
       "1649        0.0      1.000               -0.0125      0.0494       1.60   \n",
       "8481        0.3      1.000                0.4265      0.1000       0.68   \n",
       "8462        2.2      1.000                0.0556      0.1000       0.45   \n",
       "994       416.9      1.000                0.3023      0.5000       0.86   \n",
       "8257        2.6      1.000                0.0955      0.1000       0.22   \n",
       "8463        0.0      1.000               -0.1370      0.2714       0.73   \n",
       "8297        0.0      1.000               -0.1375      1.0000       0.40   \n",
       "6088        1.4      1.000                0.1667      0.1000       2.70   \n",
       "8405       37.9      1.000                0.2361      0.5000       0.72   \n",
       "6113        7.4      1.000                0.0507      0.1000       1.38   \n",
       "1962        0.1      1.000               -0.2606      0.1000       1.65   \n",
       "1702        2.7      0.701                0.5094      0.1000       1.06   \n",
       "1695        8.4      0.401                1.5833      0.1000       0.48   \n",
       "1932        2.5      1.000               -0.1047      0.3456       0.86   \n",
       "8157        0.7      1.000               -0.0273      1.0000       0.22   \n",
       "8469        3.0      1.000                0.1150      0.1000       2.00   \n",
       "8362       19.0      1.000               -0.2800      1.0000       0.20   \n",
       "1571       59.0      1.000               -0.0556      0.4000       3.42   \n",
       "8460        0.9      1.000               -0.1583      1.0000       0.24   \n",
       "1551        0.0      1.000                0.0020      0.0337       5.10   \n",
       "8420        1.9      0.500                0.0000      1.0000       0.48   \n",
       "1630        4.8      1.000                0.4211      0.1000       0.38   \n",
       "8446       10.6      0.751                0.9667      0.1000       0.30   \n",
       "6038      741.3      0.150                0.1098      0.5000       0.41   \n",
       "...         ...        ...                   ...         ...        ...   \n",
       "1035       48.3      0.601                0.0000      0.3000       1.75   \n",
       "2277       26.9      1.000                0.0500      0.3000       0.60   \n",
       "2066        1.2      1.000                0.0027      0.0451       7.56   \n",
       "1381       11.6      0.701                0.0043      0.1000       2.33   \n",
       "3699        4.3      1.000               -0.0260      0.0482      48.00   \n",
       "1958        1.1      1.000               -0.0056      0.0464       8.90   \n",
       "1438       50.7      1.000               -0.3000      0.4000       3.00   \n",
       "520         3.1      1.000               -0.0340      0.0960       4.70   \n",
       "1669       14.4      1.000                0.2519      0.3000       1.35   \n",
       "6869        3.2      1.000               -0.0920      0.1000       7.39   \n",
       "1816      286.3      1.000                0.1907      0.1739       2.78   \n",
       "1480       33.7      1.000                0.1057      0.3000       1.23   \n",
       "1022        4.0      1.000                0.0046      0.0979       2.20   \n",
       "1478        2.1      1.000               -0.0609      0.1000       2.79   \n",
       "6882      103.0      0.051               -0.0216      0.4904       1.39   \n",
       "1317      193.9      0.501                0.0035      0.5000       2.88   \n",
       "1305     1222.0      0.150               -0.1196      0.5000       3.68   \n",
       "1443       42.5      0.501               -0.1548      0.3000       1.55   \n",
       "1289       24.7      1.000                0.4689      0.3000       7.72   \n",
       "6118        2.6      0.100                0.1442      0.4543       3.12   \n",
       "6893      859.0      0.300                0.1610      0.5000       1.18   \n",
       "3822      661.0      0.100                0.0800      0.5000       1.50   \n",
       "1462      216.0      0.500               -0.0909      0.5000       1.10   \n",
       "1347       11.9      0.301               -0.0453      0.1000      11.25   \n",
       "6116        0.0      1.000                0.0014      0.0833      13.98   \n",
       "1811      556.3      0.500                0.1462      0.4348       1.71   \n",
       "1395      556.0      0.300                0.7091      0.5000       0.55   \n",
       "1285       27.5      1.000                0.0514      0.2609       3.70   \n",
       "2221      395.7      1.000                0.3488      0.5000       0.86   \n",
       "699       201.1      0.500                0.2894      0.4348       8.50   \n",
       "\n",
       "      one_hand  shares_per_hand  ipo_price_range_ratio  total_value_mid  \\\n",
       "code                                                                      \n",
       "8465       1.0           2000.0               0.372881         0.536900   \n",
       "8427       1.0           8000.0               0.214286         0.173600   \n",
       "1216       1.0           1000.0               0.044444         8.167500   \n",
       "8291       2.0           5000.0               0.333333         0.240000   \n",
       "8472       1.0           5000.0               0.000000              NaN   \n",
       "1676       1.0           4000.0               0.349650         0.715000   \n",
       "1649       1.0           2000.0               0.048780         1.262800   \n",
       "8481       1.0           5000.0               0.370370         0.337500   \n",
       "8462       1.0           5000.0               0.200000         0.300000   \n",
       "994        1.0           4000.0               0.222222         0.478080   \n",
       "8257       1.0          10000.0               0.370370         0.270000   \n",
       "8463       1.0           4000.0               0.191781         0.328500   \n",
       "8297       1.0           5000.0               0.400000         0.240000   \n",
       "6088       1.0           1000.0               0.256410        17.977994   \n",
       "8405       1.0           4000.0               0.133333         0.300000   \n",
       "6113       1.0           2000.0               0.153846         0.520000   \n",
       "1962       1.0           2000.0               0.140845         1.091625   \n",
       "1702       3.0           4000.0               0.264151         0.657200   \n",
       "1695       7.0           5000.0               0.166667         0.518400   \n",
       "1932       1.0           4000.0               0.072289         0.861125   \n",
       "8157       1.0          20000.0               0.240000         0.250000   \n",
       "8469       1.0           2000.0               0.200000         1.480000   \n",
       "8362       1.0          20000.0               0.200000         0.280000   \n",
       "1571       1.0           1000.0               0.088550         3.275000   \n",
       "8460       1.0          10000.0               0.181818         0.220000   \n",
       "1551       1.0           1000.0               0.054581        50.316418   \n",
       "8420       3.0           5000.0               0.200000         0.300000   \n",
       "1630       1.0           6000.0               0.100000         0.600000   \n",
       "8446       8.0          10000.0               0.000000              NaN   \n",
       "6038     200.0          10000.0               0.048780         0.410000   \n",
       "...        ...              ...                    ...              ...   \n",
       "1035       2.0           1500.0               0.344828         0.988990   \n",
       "2277       1.0           5000.0               0.000000              NaN   \n",
       "2066       1.0            500.0               0.049869        11.740458   \n",
       "1381       2.0           1000.0               0.000000              NaN   \n",
       "3699       1.0            100.0               0.170678       206.899785   \n",
       "1958       1.0            500.0               0.252874        18.276009   \n",
       "1438       1.0           1000.0               0.119122         8.609156   \n",
       "520        1.0            500.0               0.127660         4.999863   \n",
       "1669       1.0           2000.0               0.206897         0.580000   \n",
       "6869       1.0            500.0               0.327108         3.001230   \n",
       "1816       1.0           1000.0               0.134357        28.736406   \n",
       "1480       1.0           2000.0               0.136752         0.280800   \n",
       "1022       1.0           1500.0               0.318182         3.314220   \n",
       "1478       1.0           1000.0               0.253521         3.195000   \n",
       "6882      30.0           2000.0               0.129496         0.698406   \n",
       "1317      15.0           2000.0               0.316981         3.535100   \n",
       "1305     200.0           1000.0               0.208955         0.670000   \n",
       "1443      25.0           2000.0               0.273973         1.898000   \n",
       "1289       1.0            500.0               0.000000              NaN   \n",
       "6118     200.0           1000.0               0.306839         1.386534   \n",
       "6893     200.0           2000.0               0.181818         0.880000   \n",
       "3822     150.0           2000.0               0.400000         0.500000   \n",
       "1462     125.0           4000.0               0.444444         0.360000   \n",
       "1347      20.0           1000.0               0.089936        12.070452   \n",
       "6116       1.0            200.0               0.262275         3.624562   \n",
       "1811      25.0           2000.0               0.096970         7.079860   \n",
       "1395      20.0           5000.0               0.400000         0.400000   \n",
       "1285       1.0           1000.0               0.000000              NaN   \n",
       "2221       1.0           4000.0               0.181818         0.330000   \n",
       "699       10.0           1000.0               0.125000        18.860097   \n",
       "\n",
       "      area_大中華      ...        sales_招商(香港)  sales_太平基業證券  sales_寶威證券有限公司  \\\n",
       "code                ...                                                     \n",
       "8465         0      ...                   0             0               0   \n",
       "8427         0      ...                   0             0               0   \n",
       "1216         0      ...                   0             0               0   \n",
       "8291         0      ...                   0             0               0   \n",
       "8472         0      ...                   0             0               0   \n",
       "1676         0      ...                   0             0               0   \n",
       "1649         0      ...                   0             0               0   \n",
       "8481         0      ...                   0             0               0   \n",
       "8462         0      ...                   0             0               0   \n",
       "994          0      ...                   0             0               0   \n",
       "8257         0      ...                   0             0               0   \n",
       "8463         0      ...                   0             0               0   \n",
       "8297         0      ...                   0             0               0   \n",
       "6088         0      ...                   0             0               0   \n",
       "8405         0      ...                   0             0               0   \n",
       "6113         0      ...                   0             0               0   \n",
       "1962         0      ...                   0             0               0   \n",
       "1702         0      ...                   0             0               0   \n",
       "1695         0      ...                   0             0               0   \n",
       "1932         0      ...                   0             1               0   \n",
       "8157         0      ...                   0             0               0   \n",
       "8469         0      ...                   0             0               0   \n",
       "8362         0      ...                   0             0               0   \n",
       "1571         0      ...                   0             0               0   \n",
       "8460         0      ...                   0             0               0   \n",
       "1551         0      ...                   0             0               0   \n",
       "8420         0      ...                   0             0               0   \n",
       "1630         0      ...                   0             0               0   \n",
       "8446         0      ...                   0             0               0   \n",
       "6038         0      ...                   0             0               0   \n",
       "...        ...      ...                 ...           ...             ...   \n",
       "1035         0      ...                   0             0               0   \n",
       "2277         0      ...                   0             0               0   \n",
       "2066         0      ...                   0             0               0   \n",
       "1381         0      ...                   0             0               0   \n",
       "3699         0      ...                   0             0               0   \n",
       "1958         0      ...                   0             0               0   \n",
       "1438         0      ...                   0             0               0   \n",
       "520          0      ...                   0             0               0   \n",
       "1669         0      ...                   0             0               0   \n",
       "6869         0      ...                   0             0               0   \n",
       "1816         0      ...                   0             0               0   \n",
       "1480         0      ...                   0             0               0   \n",
       "1022         0      ...                   0             0               0   \n",
       "1478         0      ...                   0             0               0   \n",
       "6882         0      ...                   0             0               0   \n",
       "1317         0      ...                   0             0               0   \n",
       "1305         0      ...                   0             0               0   \n",
       "1443         0      ...                   0             0               0   \n",
       "1289         0      ...                   0             0               0   \n",
       "6118         0      ...                   0             0               0   \n",
       "6893         0      ...                   0             0               0   \n",
       "3822         0      ...                   0             0               0   \n",
       "1462         0      ...                   0             0               0   \n",
       "1347         0      ...                   0             0               0   \n",
       "6116         0      ...                   0             0               0   \n",
       "1811         0      ...                   0             0               0   \n",
       "1395         0      ...                   0             0               0   \n",
       "1285         0      ...                   0             0               0   \n",
       "2221         0      ...                   0             0               0   \n",
       "699          0      ...                   0             0               0   \n",
       "\n",
       "      sales_中天證券有限公司  sales_中國光大證券(香港)有限公司  sales_中州國際  sales_瑞士信貸  \\\n",
       "code                                                                 \n",
       "8465               0                     0           0           0   \n",
       "8427               0                     0           0           0   \n",
       "1216               0                     0           1           0   \n",
       "8291               0                     0           0           0   \n",
       "8472               0                     0           0           0   \n",
       "1676               0                     0           0           0   \n",
       "1649               0                     0           0           0   \n",
       "8481               0                     0           0           0   \n",
       "8462               0                     0           0           0   \n",
       "994                0                     0           0           0   \n",
       "8257               0                     0           0           0   \n",
       "8463               0                     0           0           0   \n",
       "8297               0                     0           0           0   \n",
       "6088               0                     0           0           0   \n",
       "8405               0                     0           0           0   \n",
       "6113               0                     0           0           0   \n",
       "1962               0                     0           0           0   \n",
       "1702               0                     0           0           0   \n",
       "1695               0                     0           0           0   \n",
       "1932               0                     0           0           0   \n",
       "8157               0                     0           0           0   \n",
       "8469               0                     0           0           0   \n",
       "8362               0                     0           0           0   \n",
       "1571               0                     0           0           0   \n",
       "8460               0                     0           0           0   \n",
       "1551               0                     0           0           0   \n",
       "8420               0                     0           0           0   \n",
       "1630               0                     0           0           0   \n",
       "8446               0                     0           0           0   \n",
       "6038               0                     0           0           0   \n",
       "...              ...                   ...         ...         ...   \n",
       "1035               0                     0           0           0   \n",
       "2277               0                     0           0           0   \n",
       "2066               0                     0           0           0   \n",
       "1381               0                     0           0           0   \n",
       "3699               0                     0           0           0   \n",
       "1958               0                     0           0           0   \n",
       "1438               0                     0           0           0   \n",
       "520                0                     0           0           0   \n",
       "1669               0                     0           0           0   \n",
       "6869               0                     0           0           0   \n",
       "1816               0                     0           0           0   \n",
       "1480               0                     0           0           0   \n",
       "1022               0                     0           0           0   \n",
       "1478               0                     0           0           0   \n",
       "6882               0                     0           0           0   \n",
       "1317               0                     0           0           0   \n",
       "1305               0                     0           0           0   \n",
       "1443               0                     0           0           0   \n",
       "1289               0                     0           0           0   \n",
       "6118               0                     0           0           0   \n",
       "6893               0                     0           0           0   \n",
       "3822               0                     0           0           0   \n",
       "1462               0                     0           0           0   \n",
       "1347               0                     0           0           0   \n",
       "6116               0                     0           0           0   \n",
       "1811               0                     0           0           0   \n",
       "1395               0                     0           0           0   \n",
       "1285               0                     0           0           0   \n",
       "2221               0                     0           0           0   \n",
       "699                0                     0           0           0   \n",
       "\n",
       "      stock_type_紅籌  stock_type_H股  stock_type_其他  \n",
       "code                                               \n",
       "8465              0              0              1  \n",
       "8427              0              0              1  \n",
       "1216              0              1              0  \n",
       "8291              0              0              1  \n",
       "8472              0              0              1  \n",
       "1676              0              0              1  \n",
       "1649              0              1              0  \n",
       "8481              0              0              1  \n",
       "8462              0              0              1  \n",
       "994               0              0              1  \n",
       "8257              0              0              1  \n",
       "8463              0              0              1  \n",
       "8297              0              0              1  \n",
       "6088              0              0              1  \n",
       "8405              0              0              1  \n",
       "6113              0              0              1  \n",
       "1962              0              0              1  \n",
       "1702              0              0              1  \n",
       "1695              0              0              1  \n",
       "1932              0              0              1  \n",
       "8157              0              0              1  \n",
       "8469              0              0              1  \n",
       "8362              0              0              1  \n",
       "1571              0              0              1  \n",
       "8460              0              0              1  \n",
       "1551              0              1              0  \n",
       "8420              0              0              1  \n",
       "1630              0              0              1  \n",
       "8446              0              0              1  \n",
       "6038              0              0              1  \n",
       "...             ...            ...            ...  \n",
       "1035              0              0              1  \n",
       "2277              0              0              1  \n",
       "2066              0              1              0  \n",
       "1381              0              0              1  \n",
       "3699              0              1              0  \n",
       "1958              0              1              0  \n",
       "1438              0              0              1  \n",
       "520               0              0              1  \n",
       "1669              0              0              1  \n",
       "6869              0              1              0  \n",
       "1816              0              1              0  \n",
       "1480              0              0              1  \n",
       "1022              0              0              1  \n",
       "1478              0              0              1  \n",
       "6882              0              0              1  \n",
       "1317              0              0              1  \n",
       "1305              0              0              1  \n",
       "1443              0              0              1  \n",
       "1289              0              1              0  \n",
       "6118              0              0              1  \n",
       "6893              0              0              1  \n",
       "3822              0              0              1  \n",
       "1462              0              0              1  \n",
       "1347              1              0              0  \n",
       "6116              0              1              0  \n",
       "1811              1              0              0  \n",
       "1395              0              0              1  \n",
       "1285              0              0              1  \n",
       "2221              0              0              1  \n",
       "699               0              0              1  \n",
       "\n",
       "[278 rows x 535 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Now do one-hot encoding for all categorical columns\n",
    "#One problem is that we have to split('、') first for contents with multiple companies\n",
    "\n",
    "dftest = df.copy()\n",
    "\n",
    "def one_hot_encoding(df, column_name):\n",
    "#Reads a df and target column, does tailored one-hot encoding, and return new df for merge\n",
    "\n",
    "    cat_list = df[column_name].unique().tolist()\n",
    "    cat_set = set()\n",
    "    for items in cat_list:\n",
    "        if pd.isnull(items):\n",
    "            continue\n",
    "        items = items.split('、')\n",
    "        for item in items:\n",
    "            item = item.strip()\n",
    "            cat_set.add(item)\n",
    "    for item in cat_set:\n",
    "        item = column_name + '_' + item\n",
    "        df[item] = 0\n",
    "    \n",
    "    def check_onehot(x, cat):\n",
    "        if pd.isnull(x):\n",
    "            return 0\n",
    "        x = x.split('、')\n",
    "        for item in x:\n",
    "            if cat == item.strip():\n",
    "                return 1\n",
    "        return 0\n",
    "    \n",
    "    for item in cat_set:\n",
    "        df[column_name + '_' + item] = df[column_name].apply(check_onehot, args=(item, ))\n",
    "    \n",
    "    del df[column_name]\n",
    "    return df\n",
    "    \n",
    "dftest = one_hot_encoding(dftest, 'area')\n",
    "dftest = one_hot_encoding(dftest, 'category')\n",
    "dftest = one_hot_encoding(dftest, 'market_type')\n",
    "dftest = one_hot_encoding(dftest, 'recommender')\n",
    "dftest = one_hot_encoding(dftest, 'sales')\n",
    "dftest = one_hot_encoding(dftest, 'stock_type')\n",
    "\n",
    "dftest.to_csv('../data/hk_ipo_feature_engineered', sep='\\t', encoding='utf-8')\n",
    "dftest\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
